package com.作业.Day2;

import java.util.Scanner;

public class Homework3 {
    public static void main(String[] args) {
        while(true){
            System.out.println("请选择你购买的商品编号");
            System.out.println("1.T恤     2.网球鞋      3.网球拍");
            System.out.println("********************************");
            System.out.println("请输入商品编号:");
            Scanner scanner = new Scanner(System.in);
            int i = scanner.nextInt();
            switch (i){
                case 1:
                    System.out.println("T恤       ￥234");
                    break;
                case 2:
                    System.out.println("网球鞋      ￥40000");
                    break;
                case 3:
                    System.out.println("网球拍       ￥3400");
                    break;
            }
            System.out.println("是否继续(y/n)");
            String next = scanner.next();
            if(next.equals("n")) {
                System.out.println("程序结束");
                break;
            }


        }
    }
}
